home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!rutgers!aramis.rutgers.edu!dartagnan.rutgers.edu!mcgrew
- From: mcgrew@dartagnan.rutgers.edu (Charles Mcgrew)
- Newsgroups: comp.sources.sun
- Subject: v01i020: Tooltool - a suntools user interface builder, Part 01/13
- Message-ID: <Jun.7.00.01.01.1989.22896@dartagnan.rutgers.edu>
- Date: 7 Jun 89 04:01:20 GMT
- Organization: Rutgers Univ., New Brunswick, N.J.
- Lines: 1501
- Approved: mcgrew@aramis.rutgers.edu
-
- Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com>
- Posting-number: Volume 1, Issue 20
- Archive-name: tooltool2.1c/part01
-
- This is version 2.1c of of Chuck Musciano's "tooltool". The latest
- version from the titan.rice.edu (so far as I know) is 2.0a.
-
-
- Charles
-
-
- Tooltool allows you to build relatively complex windowed user interfaces
- for non-windowed applications using an English-like specification language.
- Tooltool comes complete with an 80 page manual and several sample interface
- specifications.
-
- Chuck Musciano ARPA : chuck@trantor.harris-atd.com
- Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
- PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
- Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004}
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 13)."
- # Contents: MANIFEST Makefile README doc doc/Makefile emalloc.c
- # patchlevel.h samples samples/calc.tt samples/laserwriter.icon
- # samples/lpq.tt samples/news.icon samples/queue.c samples/rn.tt
- # samples/stopwatch.icon samples/top.icon samples/vt100
- # samples/vt100/Makefile samples/vt100/VTEM_README
- # samples/vt100/vt.icon samples/vt100/vtem.1 samples/vt100/vtem.h
- # selection.c tooltool.icon tooltool.man
- # Wrapped by chuck@melmac on Thu Jun 1 10:39:25 1989
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(1891 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X MANIFEST 1 This shipping list
- X Makefile 1
- X README 1
- X actions.c 4
- X doc 1
- X doc/Makefile 1
- X doc/tooltool.uu.1 10
- X doc/tooltool.uu.2 12
- X doc/tooltool.uu.3 11
- X doc/tooltool.uu.4 13
- X doc/tooltool.uu.5 9
- X emalloc.c 1
- X events.c 4
- X expr.c 5
- X func.c 5
- X func_fix.c 2
- X lex.c 5
- X misc.c 4
- X objects.c 7
- X parse.y 8
- X patchlevel.h 1
- X samples 1
- X samples/README 2
- X samples/calc.tt 1
- X samples/keytool 6
- X samples/keytool.defaults.uu 2
- X samples/keytool.l 3
- X samples/keytool.r.14.uu 3
- X samples/laserwriter.icon 1
- X samples/lpq.tt 1
- X samples/lpq2.tt 2
- X samples/news.icon 1
- X samples/queue.c 1
- X samples/rn.tt 1
- X samples/stopwatch.icon 1
- X samples/stopwatch.tt 3
- X samples/top.icon 1
- X samples/top.tt 2
- X samples/vt100 1
- X samples/vt100/Makefile 1
- X samples/vt100/VTEM_README 1
- X samples/vt100/edtkeys.ras.uu 2
- X samples/vt100/newskeys.ras.uu 3
- X samples/vt100/out.c 7
- X samples/vt100/term.c 3
- X samples/vt100/vt.icon 1
- X samples/vt100/vt102tool.tt 2
- X samples/vt100/vtem.1 1
- X samples/vt100/vtem.c 2
- X samples/vt100/vtem.h 1
- X selection.c 1
- X symbols.c 2
- X tooltool.c 3
- X tooltool.h 4
- X tooltool.icon 1
- X tooltool.man 1
- X windows.c 6
- END_OF_FILE
- if test 1891 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(1613 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X# where you keep local executables
- XBINDIR = /usr/local/bin
- X
- X# man directory for local man pages (usually /usr/man/manl)
- XMANDIR = /usr/man/manl
- XMANEXT = l
- X
- X# command which will print things on a LaserWriter
- XLPR = /usr/ucb/lpr
- XPRINTER = lw
- X
- XWINDOW_LIB = -lsuntool -lsunwindow -lpixrect
- X
- XOFILES = actions.o emalloc.o events.o expr.o func.o func_fix.o misc.o \
- X objects.o parse.o selection.o symbols.o tooltool.o windows.o
- X
- XOPTIONS = -O
- X
- X.c.o:
- X cc $(OPTIONS) -c $<
- X
- X.y.o:
- X yacc $<
- X cc $(OPTIONS) -c -o $*.o y.tab.c
- X rm y.tab.c
- X
- Xtooltool: $(OFILES)
- X cc $(OPTIONS) -o tooltool $(OFILES) $(WINDOW_LIB) -lm
- X
- Xinstall: tooltool
- X cp tooltool $(BINDIR)
- X cp tooltool.man $(MANDIR)/tooltool.$(MANEXT)
- X
- Xmanual:
- X cd doc; make manual LPR="$(LPR)" PRINTER="$(PRINTER)"
- X
- Xshar:
- X cd doc/doc; make shar
- X rm -f MANIFEST*
- X makekit -s45k -oMANIFEST doc samples Makefile README *.[chy] *.icon *.man samples/* samples/vt100/* doc/Makefile doc/*.uu*
- X
- Xpatch: Makefile *.man *.[chy]
- X rm -f patch temp
- X -for i in Makefile *.man *.[chy] ; do \
- X cp orig/$$i $${i}.orig ; \
- X diff -c $${i}.orig $$i >>temp ; \
- X rm $${i}.orig ; \
- X done
- X sed '/^No differences encountered/d' <temp >patch
- X rm temp
- X
- Xnewver:
- X for i in Makefile *.[chy] ; do \
- X cp $$i orig/$$i ; \
- X done
- X
- Xclean:
- X rm -f *.o y.output tooltool core Part*
- X
- X#dependencies
- X
- Xactions.o: tooltool.h
- X
- Xemalloc.o: tooltool.h
- X
- Xevents.o: tooltool.h
- X
- Xexpr.o: tooltool.h
- X
- Xfunc.o: tooltool.h
- X
- Xfunc_fix.o: tooltool.h
- X
- Xmisc.o: tooltool.h
- X
- Xobjects.o: tooltool.h
- X
- Xparse.o: tooltool.h lex.c
- X
- Xselection.o: tooltool.h
- X
- Xsymbols.o: tooltool.h
- X
- Xtooltool.o: tooltool.h
- X
- Xwindows.o: tooltool.h
- END_OF_FILE
- if test 1613 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(4684 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X/************************************************************************/
- X/* Copyright 1988 by Chuck Musciano and Harris Corporation */
- X/* */
- X/* Permission to use, copy, modify, and distribute this software */
- X/* and its documentation for any purpose and without fee is */
- X/* hereby granted, provided that the above copyright notice */
- X/* appear in all copies and that both that copyright notice and */
- X/* this permission notice appear in supporting documentation, and */
- X/* that the name of Chuck Musciano and Harris Corporation not be */
- X/* used in advertising or publicity pertaining to distribution */
- X/* of the software without specific, written prior permission. */
- X/* Chuck Musciano and Harris Corporation make no representations */
- X/* about the suitability of this software for any purpose. It is */
- X/* provided "as is" without express or implied warranty. */
- X/* */
- X/* The sale of any product based wholely or in part upon the */
- X/* technology provided by tooltool is strictly forbidden without */
- X/* specific, prior written permission from Harris Corporation. */
- X/* Tooltool technology includes, but is not limited to, the source */
- X/* code, executable binary files, specification language, and */
- X/* sample specification files. */
- X/************************************************************************/
- X
- X
- X Tooltool is a new way to create windowed applications. Using existing
- Xapplications, and a simple specification language, users can produce
- Xwindowed tools with gadgets, mouse actions, and keyboard remapping without
- Xhaving to learn or use the SunView programming interface.
- X
- X To build tooltool, first check a few site dependencies in the Makefile
- Xand in tooltool.c. These dependencies are:
- X
- X In Makefile:
- X BINDIR Where the executable will go, normally
- X /usr/local/bin
- X MANDIR Where the man page will go, normally
- X /usr/man/manl
- X MANEXT The man page extension, usually 'l',
- X for local man pages. You may want to
- X make MANDIR /usr/man/man1, in which case
- X MANEXT should be '1'.
- X LPR The complete command you would use to
- X print something on your local LaserWriter.
- X Typically, this is /usr/ucb/lpr, but you
- X might need a different printer name than
- X the default.
- X In windows.c:
- X TOOLTOOL_ICON Where the tooltool icon can be found.
- X Normally, it is in the directory that you
- X created tooltool in, but you might want to move
- X it to a more global place. We keep all our
- X icons in /usr/local/images, for example.
- X Fix this path to match where you put the icon.
- X
- XYou can then build tooltool by typing "make tooltool". If you wish to try out
- Xthe sample applications, cd to samples, and type "../tooltool -f <file>.tt",
- Xwhere <file>.tt is any of the .tt files in the directory. See the README
- Xin samples for more information. When in samples, if you haven't installed
- Xtooltool, you'll need to use "../tooltool" to invoke tooltool.
- X
- X Tooltool comes with extensive documentation, which is printed by typing
- X"make manual". The manual will emerge from your LaserWriter. It should print
- Xon either a regular LaserWriter, LaserWriter Plus, or LaserWriter II NT or
- XNTX. If you have problems getting it to print, please send e-mail. If you
- Xdo not have a LaserWriter, I'll be glad to mail you hardcopy. Just send
- Xa request via e-mail or call me.
- X
- X I think tooltool opens up a new world of easy application programming.
- XI am very interested in seeing how others use tooltool, and any comments
- Xor suggestions you may have. If you send me your e-mail address, I will
- Xkeep you up to date with bug fixes, patches, and enhancements. If you
- Xhave a good tooltool file, I'll be glad to distribute it to anyone who
- Xrequests it. In particular, I'd like to see tooltool specs for things
- Xlike vi, gnuemacs, various games, and the like. Bottom line: get on the
- Xtooltool mailing list, and I'll keep you up to date as things progress.
- X
- X Many thanks are due the tooltool betatesting team, who perservered
- Xthrough early releases of this version while I frantically fixed all the
- Xbugs. The betatesting team was:
- X
- X Ian Clowes Ken Laprade
- X Paul J. Emerson Andy Lord
- X Phill Everson David Masterson
- X David Fickes Neil Movold
- X David Forslund Troy D. Spetz
- X Len Jacobs Larry W. Virden
- X Orest Jarosiewicz C. Philip Wood
- X Doug Johnson Peter Windsor
- X Philip Kegelmeyer Mitchell F. Wyle
- X Francis Kam
- X
- X Please send all bugs, comments, requests, suggestions, and tooltool
- Xfiles to:
- X
- X Chuck Musciano
- X Advanced Technology Department
- X Harris Corporation
- X PO Box 37, MS 3A/1912
- X Melbourne, FL 32902
- X
- X (407) 727-6131
- X ARPA: chuck@trantor.harris-atd.com
- X
- XI hope you find tooltool useful!
- END_OF_FILE
- if test 4684 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test ! -d 'doc' ; then
- echo shar: Creating directory \"'doc'\"
- mkdir 'doc'
- fi
- if test -f 'doc/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/Makefile'\"
- else
- echo shar: Extracting \"'doc/Makefile'\" \(257 characters\)
- sed "s/^X//" >'doc/Makefile' <<'END_OF_FILE'
- X.SUFFIXES: .ps .uu
- X
- X.uu.ps:
- X uudecode $<
- X uncompress $*.ps.Z
- X
- Xmanual: tooltool.ps
- X $(LPR) -P$(PRINTER) -J"Tooltool Manual" tooltool.ps
- X
- Xtooltool.uu: tooltool.uu.1 tooltool.uu.2 tooltool.uu.3 tooltool.uu.4 tooltool.uu.5
- X cat tooltool.uu.[12345] >tooltool.uu
- END_OF_FILE
- if test 257 -ne `wc -c <'doc/Makefile'`; then
- echo shar: \"'doc/Makefile'\" unpacked with wrong size!
- fi
- # end of 'doc/Makefile'
- fi
- if test -f 'emalloc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'emalloc.c'\"
- else
- echo shar: Extracting \"'emalloc.c'\" \(2541 characters\)
- sed "s/^X//" >'emalloc.c' <<'END_OF_FILE'
- X/************************************************************************/
- X/* Copyright 1988 by Chuck Musciano and Harris Corporation */
- X/* */
- X/* Permission to use, copy, modify, and distribute this software */
- X/* and its documentation for any purpose and without fee is */
- X/* hereby granted, provided that the above copyright notice */
- X/* appear in all copies and that both that copyright notice and */
- X/* this permission notice appear in supporting documentation, and */
- X/* that the name of Chuck Musciano and Harris Corporation not be */
- X/* used in advertising or publicity pertaining to distribution */
- X/* of the software without specific, written prior permission. */
- X/* Chuck Musciano and Harris Corporation make no representations */
- X/* about the suitability of this software for any purpose. It is */
- X/* provided "as is" without express or implied warranty. */
- X/* */
- X/* The sale of any product based wholely or in part upon the */
- X/* technology provided by tooltool is strictly forbidden without */
- X/* specific, prior written permission from Harris Corporation. */
- X/* Tooltool technology includes, but is not limited to, the source */
- X/* code, executable binary files, specification language, and */
- X/* sample specification files. */
- X/************************************************************************/
- X
- X#include "tooltool.h"
- X
- X#define MIN_BUF_SIZE 32768
- X
- Xtypedef struct em_rec em_data, *em_ptr;
- X
- Xstruct em_rec {int size;
- X int remaining;
- X char *buf;
- X em_ptr next;
- X };
- X
- XPRIVATE em_ptr buf_list = NULL;
- X
- X/************************************************************************/
- XEXPORT char *tt_emalloc(size)
- X
- Xint size;
- X
- X{ em_ptr em;
- X char *p;
- X
- X size = ((size + 3) & ~3);
- X for (em = buf_list; em; em = em->next)
- X if (em->remaining >= size)
- X break;
- X if (em == NULL) {
- X em = (em_ptr) safe_malloc(sizeof(em_data));
- X em->size = em->remaining = max(size, MIN_BUF_SIZE);
- X em->buf = (char *) safe_malloc(em->size);
- X em->next = buf_list;
- X buf_list = em;
- X }
- X p = em->buf + em->size - em->remaining;
- X em->remaining -= size;
- X return(p);
- X}
- X
- X/************************************************************************/
- XEXPORT tt_reset_emalloc()
- X
- X{ em_ptr em;
- X
- X for (em = buf_list; em; em = em->next)
- X em->remaining = em->size;
- X}
- X
- X/************************************************************************/
- XEXPORT int tt_is_temp(p)
- X
- Xchar *p;
- X
- X{ em_ptr em;
- X
- X for (em = buf_list; em; em = em->next)
- X if (p >= em->buf && p <= em->buf + em->size)
- X return(TRUE);
- X return(FALSE);
- X}
- END_OF_FILE
- if test 2541 -ne `wc -c <'emalloc.c'`; then
- echo shar: \"'emalloc.c'\" unpacked with wrong size!
- fi
- # end of 'emalloc.c'
- fi
- if test -f 'patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patchlevel.h'\"
- else
- echo shar: Extracting \"'patchlevel.h'\" \(1755 characters\)
- sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
- X/************************************************************************/
- X/* */
- X/* Tooltool Version 2.0 Patch History */
- X/* */
- X/* Date Version Comments */
- X/* 01 Dec 88 2.0 Initial release */
- X/* 25 Jan 89 2.0a Small bug fixes: */
- X/* Fixed ++ and -- when used with text */
- X/* fields. */
- X/* Changed to use access(2) to deter- */
- X/* mine executability of applica- */
- X/* tion. */
- X/* Fixed bug in computing mouse offsets */
- X/* when large fonts were used. */
- X/* 02 Feb 89 2.1 Fixed bug in premature conversion of */
- X/* strings to numbers. */
- X/* Added shift operators: >> and <<. */
- X/* Added assignment operators: +=, -=, *=, */
- X/* /=, %=, &=, |=, and ^=. */
- X/* Readable, writable, and executable */
- X/* intrinsic functions now use the */
- X/* access(2) routine. */
- X/* Cleaned up scanning of punctuation. */
- X/* Fixed error message when EOF is hit. */
- X/* Fixed timeout while waiting for window */
- X/* size to settle. */
- X/* Tooltool now searches your path for the */
- X/* -f specification file. */
- X/* If the application is "", no applica- */
- X/* tion window is created. */
- X/* 18 Apr 89 2.1a Fixed bug in scanning real numbers. */
- X/* Fixed initialization of text item */
- X/* actions. */
- X/* Fixed function key mapping bug, so that */
- X/* all function keys map correctly with */
- X/* or without a .ttyswrc file entry. */
- X/* 25 Apr 89 2.1b Fixed the handling of meta keys in the */
- X/* function key fix. */
- X/* */
- X/* 1 Jun 89 2.1c Clarified wording of copyright notice. */
- X/* */
- X/************************************************************************/
- END_OF_FILE
- if test 1755 -ne `wc -c <'patchlevel.h'`; then
- echo shar: \"'patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'patchlevel.h'
- fi
- if test ! -d 'samples' ; then
- echo shar: Creating directory \"'samples'\"
- mkdir 'samples'
- fi
- if test -f 'samples/calc.tt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/calc.tt'\"
- else
- echo shar: Extracting \"'samples/calc.tt'\" \(1176 characters\)
- sed "s/^X//" >'samples/calc.tt' <<'END_OF_FILE'
- Xapplication "bc"
- X size 2 by 20 characters
- X label "<< Calculator >>"
- Xgadgets
- X bottom
- X proportional
- X font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
- X button
- X normal " Clear " send "c\n";
- X end_button
- X button
- X normal " Close " close;
- X shift " Quit " exit;
- X end_button
- X button
- X normal " 7 " send "7";
- X end_button
- X button
- X normal " 8 " send "8";
- X end_button
- X button
- X normal " 9 " send "9";
- X end_button
- X button
- X normal " / " send "/";
- X end_button
- X button
- X normal " 4 " send "4";
- X end_button
- X button
- X normal " 5 " send "5";
- X end_button
- X button
- X normal " 6 " send "6";
- X end_button
- X button
- X normal " X " send "*";
- X end_button
- X button
- X normal " 1 " send "1";
- X end_button
- X button
- X normal " 2 " send "2";
- X end_button
- X button
- X normal " 3 " send "3";
- X end_button
- X button
- X normal " - " send "-";
- X end_button
- X button
- X normal " 0 " send "0";
- X end_button
- X button
- X normal " . " send ".";
- X end_button
- X button
- X normal " = " send "\n";
- X end_button
- X button
- X normal " + " send "+";
- X end_button
- Xend_gadgets
- END_OF_FILE
- if test 1176 -ne `wc -c <'samples/calc.tt'`; then
- echo shar: \"'samples/calc.tt'\" unpacked with wrong size!
- fi
- # end of 'samples/calc.tt'
- fi
- if test -f 'samples/laserwriter.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/laserwriter.icon'\"
- else
- echo shar: Extracting \"'samples/laserwriter.icon'\" \(947 characters\)
- sed "s/^X//" >'samples/laserwriter.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=30, Depth=1, Valid_bits_per_item=16
- X */
- X 0x888F,0xFFFF,0xFFFF,0xFFFC,0x2228,0x0000,0x0000,0x0006,
- X 0x2228,0x0000,0x0000,0x0006,0x8888,0x0000,0x0000,0x0004,
- X 0x8888,0x0000,0x0000,0x0004,0x222F,0xFFFF,0xFFFF,0xFFFE,
- X 0x2229,0x0100,0x0000,0x0806,0x8889,0x0100,0x0000,0x0804,
- X 0x8889,0x0100,0x0000,0x0804,0x2229,0x3D00,0x0000,0x0806,
- X 0x2229,0x2500,0x0F00,0x0806,0x8889,0x3D00,0x0900,0x0804,
- X 0x8889,0x3D00,0x0F00,0x0804,0x2229,0x3D00,0x0000,0x0806,
- X 0x2229,0x0100,0x0000,0x0806,0x8889,0x0100,0x0000,0x0804,
- X 0x8889,0x0100,0x0000,0x0808,0xE22F,0xFFFF,0xFFFF,0xF812,
- X 0xFE2F,0x8000,0x0000,0x07E2,0x9FFF,0x8000,0x0000,0x0028,
- X 0x8BFF,0x80FF,0xFFFF,0xF028,0x2222,0x8000,0x0000,0x0022,
- X 0x2222,0x80FF,0xFFFF,0xF022,0x8888,0x8000,0x0000,0x0028,
- X 0x8888,0x80FF,0xFFFF,0xF028,0x2222,0x8000,0x0000,0x0022,
- X 0x2222,0x80FF,0xFFFF,0xF022,0x8888,0x8000,0x0000,0x0028,
- X 0x8888,0xFFFF,0xFFFF,0xFFE8,0x2222,0x2FA2,0x2222,0x3E22
- END_OF_FILE
- if test 947 -ne `wc -c <'samples/laserwriter.icon'`; then
- echo shar: \"'samples/laserwriter.icon'\" unpacked with wrong size!
- fi
- # end of 'samples/laserwriter.icon'
- fi
- if test -f 'samples/lpq.tt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/lpq.tt'\"
- else
- echo shar: Extracting \"'samples/lpq.tt'\" \(701 characters\)
- sed "s/^X//" >'samples/lpq.tt' <<'END_OF_FILE'
- Xapplication "queue"
- X open send "b\n";
- X close send "e\n";
- X size 8 by 80 characters
- X icon "laserwriter.icon"
- X label "<< Print Queue Monitor >>"
- Xgadgets
- X font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
- X align middle
- X button
- X normal "Close" close;
- X shift "Exit" send "q\n";
- X end_button
- X button
- X normal "Start Polling" send "b\n";
- X end_button
- X button
- X normal "Stop Polling" send "e\n";
- X end_button
- X slider interval
- X label "Interval:"
- X minimum 5
- X maximum 120
- X width 75
- X initial 10
- X range off
- X action send format("i%d\n", interval);
- X end_slider
- Xend_gadgets
- Xkeys
- X disable normal_keys
- X disable function_keys
- Xend_keys
- END_OF_FILE
- if test 701 -ne `wc -c <'samples/lpq.tt'`; then
- echo shar: \"'samples/lpq.tt'\" unpacked with wrong size!
- fi
- # end of 'samples/lpq.tt'
- fi
- if test -f 'samples/news.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/news.icon'\"
- else
- echo shar: Extracting \"'samples/news.icon'\" \(1933 characters\)
- sed "s/^X//" >'samples/news.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x1100,0x0000,0x0001,0x8404,0x1900,0x0000,0x2021,
- X 0x8404,0x191C,0x4470,0x2021,0xAEAE,0x9522,0x4489,0x7575,
- X 0x9F1F,0x1522,0x5480,0xF8F9,0x8E0E,0x133E,0x5470,0x7071,
- X 0x8A0A,0x1320,0x5408,0x5051,0x9111,0x1122,0x5488,0x8889,
- X 0x8000,0x111C,0x2870,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8EEA,0xEEAA,0x0077,0x4671,0x88AE,0xAAEA,0x0045,0x4541,
- X 0x88AA,0xEEE4,0x0065,0x4571,0x88AA,0x8AA4,0x0045,0x4511,
- X 0x8EEA,0x8AA4,0x0047,0x7671,0x8000,0x0000,0x0000,0x0001,
- X 0x8EAE,0xEEEE,0xAE05,0x7571,0x8848,0x8884,0xA807,0x4541,
- X 0x8C48,0xCEE4,0x4C07,0x6771,0x88A8,0x8224,0x4805,0x4711,
- X 0x8EAE,0xEEEE,0x4E05,0x7571,0x8000,0x0000,0x0000,0x0001,
- X 0x8EE4,0xCEAE,0x0742,0x5761,0x8A8A,0xA4E8,0x0545,0x7451,
- X 0x8ECE,0xA4EA,0x0747,0x7651,0x8C8A,0xA4AA,0x0545,0x5451,
- X 0x8AEA,0xCEAE,0x0775,0x5761,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8002,0xAA80,0x0200,0x0009,0xBFFB,0x55BF,0xFB00,0x0009,
- X 0x8002,0xAA80,0x0280,0x0009,0xBFFB,0x55BF,0xFA40,0x0009,
- X 0x8002,0xAA80,0x0220,0x0009,0xBFFB,0x55BF,0xFA11,0x8009,
- X 0x8002,0xAA80,0x020A,0x4009,0xBFFB,0x55BF,0xFA04,0x2009,
- X 0x8002,0xAA80,0x0200,0x1009,0xBFFB,0x55BF,0xFA00,0x0809,
- X 0x8002,0xAA80,0x0200,0x0589,0xBFFB,0x55BF,0xFA00,0x0249,
- X 0x8002,0xAA80,0x0200,0x0029,0xBFFB,0x55BF,0xFA00,0x0019,
- X 0x8003,0xFF80,0x0200,0x0009,0xBFF8,0x003F,0xFA00,0x0009,
- X 0x8000,0x0000,0x0200,0x0009,0xBFFB,0xFFBF,0xFA00,0x0009,
- X 0x8000,0x0000,0x0200,0x0009,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- END_OF_FILE
- if test 1933 -ne `wc -c <'samples/news.icon'`; then
- echo shar: \"'samples/news.icon'\" unpacked with wrong size!
- fi
- # end of 'samples/news.icon'
- fi
- if test -f 'samples/queue.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/queue.c'\"
- else
- echo shar: Extracting \"'samples/queue.c'\" \(2397 characters\)
- sed "s/^X//" >'samples/queue.c' <<'END_OF_FILE'
- X#include <stdio.h>
- X#include <signal.h>
- X#include <sgtty.h>
- X#include <sys/time.h>
- X#include <pwd.h>
- X
- X#define strsave(s) ((char *) strcpy((char *) malloc(strlen(s) + 1), s))
- X
- X#define CLEAR "\014"
- X#define BOLD_ON "\033[7m"
- X#define BOLD_OFF "\033[m"
- X
- X#define LPQ "/usr/ucb/lpq"
- X
- Xstruct itimerval interval = {{10, 0}, {10, 0}};
- Xstruct itimerval zero_timer = {{0, 0}, {0, 0}};
- X
- Xchar *user_name;
- X
- Xchar *strindex(source, target)
- X
- Xchar *source;
- Xchar *target;
- X
- X{ register int len;
- X
- X len = strlen(target);
- X for (; *source; source++)
- X if (strncmp(source, target, len) == 0)
- X return(source);
- X return(0);
- X}
- X
- Xpoll()
- X
- X{ FILE *f;
- X char buf[256];
- X int line;
- X
- X if ((f = popen(LPQ, "r")) == NULL) {
- X printf("%s%sCould not execute %s%s\n", CLEAR, BOLD_ON, LPQ, BOLD_OFF);
- X return;
- X }
- X printf(CLEAR);
- X for (line = 1; fgets(buf, 256, f) != NULL; line++)
- X if (line <= 2 || strindex(buf, user_name))
- X printf("%s%s%s", BOLD_ON, buf, BOLD_OFF);
- X else
- X printf(buf);
- X pclose(f);
- X}
- X
- Xstart_timer()
- X
- X{
- X setitimer(ITIMER_REAL, &interval, NULL);
- X}
- X
- Xstop_timer()
- X
- X{
- X setitimer(ITIMER_REAL, &zero_timer, NULL);
- X}
- X
- Xmain()
- X
- X{ char c;
- X int i;
- X struct sgttyb tty, old_in, old_out;
- X struct passwd *pp;
- X
- X pp = getpwuid(getuid());
- X user_name = strsave(pp->pw_name);
- X
- X ioctl(0, TIOCGETP, &old_in);
- X tty = old_in;
- X tty.sg_flags |= CBREAK;
- X tty.sg_flags &= ~ECHO;
- X ioctl(0, TIOCSETP, &tty);
- X
- X ioctl(1, TIOCGETP, &old_out);
- X tty = old_out;
- X tty.sg_flags |= CBREAK;
- X tty.sg_flags &= ~ECHO;
- X ioctl(1, TIOCSETP, &tty);
- X
- X signal(SIGALRM, poll);
- X poll();
- X start_timer();
- X while ((c = getchar()) != EOF)
- X switch (c) {
- X case 'b' : start_timer();
- X while (getchar() != '\n')
- X ;
- X break;
- X case 'e' : stop_timer();
- X while (getchar() != '\n')
- X ;
- X break;
- X case 'i' : for (i = 0; (c = getchar()) != '\n'; )
- X if (c >= '0' && c <= '9')
- X i = i * 10 + c - '0';
- X if (i == 0)
- X break;
- X interval.it_value.tv_sec = i;
- X interval.it_value.tv_usec = 0;
- X interval.it_interval.tv_sec = i;
- X interval.it_interval.tv_usec = 0;
- X start_timer();
- X break;
- X case 'q' : stop_timer();
- X ioctl(0, TIOCSETP, &old_in);
- X ioctl(1, TIOCSETP, &old_out);
- X exit(0);
- X }
- X ioctl(0, TIOCSETP, &old_in);
- X ioctl(1, TIOCSETP, &old_out);
- X exit(0);
- X}
- END_OF_FILE
- if test 2397 -ne `wc -c <'samples/queue.c'`; then
- echo shar: \"'samples/queue.c'\" unpacked with wrong size!
- fi
- # end of 'samples/queue.c'
- fi
- if test -f 'samples/rn.tt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/rn.tt'\"
- else
- echo shar: Extracting \"'samples/rn.tt'\" \(1112 characters\)
- sed "s/^X//" >'samples/rn.tt' <<'END_OF_FILE'
- Xapplication "rn -m=s"
- X font "/usr/lib/fonts/fixedwidthfonts/screen.r.14"
- X size 36 by 80 characters
- X label "<< Newstool >>"
- X icon "news.icon"
- Xgadgets
- X top
- X font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
- X button
- X normal "Restart Article" send "^R";
- X shift "Decrypt Article" send "^X";
- X end_button
- X button
- X normal "Previous Article" send "P";
- X shift "Previous Unread Article" send "p";
- X end_button
- X button
- X normal "Kill Subject" send "k";
- X end_button
- X button
- X normal "Close" close;
- X shift "Quit" send "q";
- X end_button
- X button
- X normal "Subject List" send "=";
- X end_button
- X button
- X normal "Next Article" send "N";
- X shift "Next Unread Article" send "n";
- X end_button
- X button
- X normal "Same Subject" send "^N";
- X end_button
- X menu "Others"
- X "Go to first unread article" send "^";
- X "Go to last article" send "$";
- X "Mark all articles read" send "c";
- X "Reply via mail" send "r";
- X "Reply, including article" send "R";
- X "Unsubscribe" send "u";
- X end_menu
- Xend_gadgets
- END_OF_FILE
- if test 1112 -ne `wc -c <'samples/rn.tt'`; then
- echo shar: \"'samples/rn.tt'\" unpacked with wrong size!
- fi
- # end of 'samples/rn.tt'
- fi
- if test -f 'samples/stopwatch.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/stopwatch.icon'\"
- else
- echo shar: Extracting \"'samples/stopwatch.icon'\" \(1933 characters\)
- sed "s/^X//" >'samples/stopwatch.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0x8888,0x888F,0xF888,0x8888,0x8888,0x888A,0xA888,0x8888,
- X 0x2222,0x222A,0xAA22,0x2222,0x2222,0x222A,0xAA22,0x2222,
- X 0x8888,0x888F,0xF888,0x8888,0x8888,0x888A,0x2888,0x8888,
- X 0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
- X 0x8888,0x88BF,0xFC88,0x8888,0x8888,0x89FF,0xFF88,0x8888,
- X 0x2222,0x2FE0,0x07F2,0x2222,0x2222,0x3F00,0x80FE,0x2222,
- X 0x8888,0xF800,0x801E,0x8888,0x8889,0xE000,0x8007,0x8888,
- X 0x2223,0xC000,0x8003,0xE222,0x2227,0x0000,0x8000,0xE222,
- X 0x888E,0x0000,0x0000,0x7888,0x889C,0x0000,0x0000,0x3888,
- X 0x2238,0x0000,0x0000,0x1E22,0x2271,0x0000,0x0000,0x8E22,
- X 0x88E0,0x8000,0x0001,0x0688,0x88E0,0x4000,0x0002,0x0788,
- X 0x23C0,0x2000,0x0004,0x03A2,0x2380,0x0000,0x0000,0x01A2,
- X 0x8B80,0x0000,0x0000,0x01C8,0x8B00,0x0000,0x0000,0x00C8,
- X 0x2300,0x0000,0x0000,0x00E2,0x2700,0x0000,0x0000,0x18E2,
- X 0x8E00,0x0000,0x0000,0x6068,0x8E00,0x0000,0x0003,0x8068,
- X 0x2E00,0x0000,0x000E,0x0072,0x2C00,0x0000,0x0078,0x0032,
- X 0x8C00,0x0000,0x01C0,0x0038,0x8C00,0x0000,0x0F00,0x0038,
- X 0x2C00,0x0000,0x3C00,0x0032,0x2DF0,0x0000,0xF000,0x0FB2,
- X 0x8C00,0x0000,0xC000,0x0038,0x8C00,0x0000,0x0000,0x0038,
- X 0x2C00,0x0000,0x0000,0x0032,0x2C00,0x0003,0xE000,0x0032,
- X 0x8C00,0x000C,0x1800,0x0038,0x8E00,0x0010,0x0400,0x0078,
- X 0x2600,0x0020,0x8200,0x0062,0x2600,0x0024,0x1200,0x0062,
- X 0x8F00,0x0040,0x2100,0x00E8,0x8B00,0x0040,0x4100,0x00C8,
- X 0x2300,0x0048,0x8900,0x00E2,0x2380,0x0040,0x0100,0x01E2,
- X 0x8980,0x0040,0x0100,0x0188,0x89C0,0x2024,0x1204,0x0388,
- X 0x22E0,0x4020,0x8202,0x0722,0x2260,0x8010,0x0401,0x0622,
- X 0x88F1,0x000C,0x1800,0x8E88,0x88B8,0x0003,0xE000,0x1C88,
- X 0x223C,0x0000,0x0000,0x3A22,0x222E,0x0000,0x0000,0x7222,
- X 0x888F,0x0000,0x8000,0xE888,0x888B,0xC000,0x8003,0xC888,
- X 0x2223,0xE000,0x8007,0xA222,0x2222,0x7800,0x801E,0x2222,
- X 0x8888,0xBF00,0x80FC,0x8888,0x8888,0x8FE0,0x07F8,0x8888,
- X 0x2222,0x23FF,0xFFA2,0x2222,0x2222,0x223F,0xFE22,0x2222
- END_OF_FILE
- if test 1933 -ne `wc -c <'samples/stopwatch.icon'`; then
- echo shar: \"'samples/stopwatch.icon'\" unpacked with wrong size!
- fi
- # end of 'samples/stopwatch.icon'
- fi
- if test -f 'samples/top.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/top.icon'\"
- else
- echo shar: Extracting \"'samples/top.icon'\" \(1933 characters\)
- sed "s/^X//" >'samples/top.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,
- X 0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
- X 0x8888,0xFFFF,0xFFFF,0x8888,0x8889,0xFFFF,0xFFFF,0x8888,
- X 0x2223,0xFFFF,0xFFFF,0xE222,0x2227,0xFFFF,0xFFFF,0xE222,
- X 0x888F,0xFFFF,0xFFFF,0xF888,0x889F,0xFFFF,0xFFFF,0xF888,
- X 0x223F,0xFFFF,0xFFFF,0xFA22,0x223F,0xFFFF,0xFFFF,0xFC22,
- X 0x88C8,0x8888,0x8888,0x8A88,0x88E2,0x2222,0x2222,0x2288,
- X 0x22C4,0x4444,0x4444,0x4522,0x2291,0x1111,0x1111,0x1122,
- X 0x8988,0x8888,0x8888,0x8888,0x8922,0x2222,0x2222,0x2288,
- X 0x2344,0x4444,0x4444,0x44A2,0x23FF,0xFFFF,0xFFFF,0xFFA2,
- X 0x8B77,0x7777,0x7777,0x7748,0x8BDD,0xDDDD,0xDDDD,0xDDC8,
- X 0x23BB,0xBBBB,0xBBBB,0xBBE2,0x22EE,0xEEEE,0xEEEE,0xEEE2,
- X 0x8B77,0x7777,0x7777,0x7748,0x8BDD,0xDDDD,0xDDDD,0xDDC8,
- X 0x23BB,0xBBBB,0xBBBB,0xBBE2,0x23FF,0xFFFF,0xFFFF,0xFFE2,
- X 0x8AAA,0xAAAA,0xAAAA,0xAAC8,0x8955,0x5555,0x5555,0x5588,
- X 0x23AA,0xAAAA,0xAAAA,0xAAA2,0x2355,0x5555,0x5555,0x55A2,
- X 0x89AA,0xAAAA,0xAAAA,0xAA88,0x88D5,0x5555,0x5555,0x5588,
- X 0x22AA,0xAAAA,0xAAAA,0xAB22,0x227F,0xFFFF,0xFFFF,0xFE22,
- X 0x88C8,0x8888,0x8888,0x8A88,0x88A8,0x8888,0x8888,0x8C88,
- X 0x2232,0x2222,0x2222,0x2A22,0x2232,0x2222,0x2222,0x2A22,
- X 0x8888,0x8888,0x8888,0x9888,0x888C,0x8888,0x8888,0xA888,
- X 0x2222,0x2222,0x2222,0x6222,0x2223,0xFFFF,0xFFFF,0xE222,
- X 0x8889,0x0000,0x0000,0x8888,0x8888,0x8000,0x0001,0x8888,
- X 0x2222,0x7FFF,0xFFFE,0x2222,0x2222,0x2000,0x0006,0x2222,
- X 0x8888,0x9000,0x0008,0x8888,0x8888,0x8FFF,0xFFF8,0x8888,
- X 0x2222,0x2400,0x0022,0x2222,0x2222,0x2200,0x0062,0x2222,
- X 0x8888,0x89FF,0xFF88,0x8888,0x8888,0x8880,0x0188,0x8888,
- X 0x2222,0x2240,0x0222,0x2222,0x2222,0x223F,0xFE22,0x2222,
- X 0x8888,0x8890,0x0888,0x8888,0x8888,0x8888,0x1888,0x8888,
- X 0x2222,0x2227,0xE222,0x2222,0x2222,0x2223,0xE222,0x2222,
- X 0x8888,0x8889,0x8888,0x8888,0x8888,0x8889,0x8888,0x8888,
- X 0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222
- END_OF_FILE
- if test 1933 -ne `wc -c <'samples/top.icon'`; then
- echo shar: \"'samples/top.icon'\" unpacked with wrong size!
- fi
- # end of 'samples/top.icon'
- fi
- if test ! -d 'samples/vt100' ; then
- echo shar: Creating directory \"'samples/vt100'\"
- mkdir 'samples/vt100'
- fi
- if test -f 'samples/vt100/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/vt100/Makefile'\"
- else
- echo shar: Extracting \"'samples/vt100/Makefile'\" \(2045 characters\)
- sed "s/^X//" >'samples/vt100/Makefile' <<'END_OF_FILE'
- X#
- X#Here are the fields you may wish to change
- X#
- X# location of executable
- XBINDIR = /usr/local/bin
- X# where do you store images?
- XIMAGEDIR = /usr/local/images
- X# where do you want the manual pages to go?
- XMANDIR = /usr/man/manl
- X# select an extension for the manual pages
- X# that is, do you want /usr/man/manl/vtem.l or /usr/man/man1/vttool.1
- XMAN = l
- X#
- X# now for compiler flags
- XCFLAGS = -O
- X#
- X# the rest should be of little interest unless you are going to
- X# enhance/debug/mail this program
- X#
- XVSOURCES = out.c term.c vtem.c
- XVTEMFILES = ${VSOURCES} vtem.h vtem.1
- XVOBJECTS = term.o out.o vtem.o
- XIMAGES = edtkeys.ras newskeys.ras vt.icon
- XMISCFILES = VTEM_README Makefile vt102tool.tt edtkeys.ras.uu newskeys.ras.uu vt.icon
- XSHAR = shar -c -v -p X
- X
- XCC= /bin/cc
- XLINTFLAGS = -DLINT
- XLIBS = -lsuntool -lsunwindow -lpixrect
- X
- Xall: vtem newskeys.ras edtkeys.ras
- X
- Xvtem: ${VOBJECTS}
- X $(CC) $(CFLAGS) -o vtem ${VOBJECTS} -ltermcap
- X
- X.c.o: ; $(CC) $(CFLAGS) -c $*.c
- X
- Xedtkeys.ras: edtkeys.ras.uu
- X uudecode edtkeys.ras.uu
- X
- Xnewskeys.ras: newskeys.ras.uu
- X uudecode newskeys.ras.uu
- X
- Xinstall: all
- X install -s vtem $(BINDIR)/vtem
- X sed<vt102tool.tt >$(BINDIR)/vt102tool.tt -e 's=/usr/local/images=$(IMAGEDIR)='
- X cp $(IMAGES) $(IMAGEDIR)
- X cp vtem.1 ${MANDIR}/vtem.${MAN}
- X
- Xlint:
- X lint $(LINTFLAGS) $(SOURCES) -lc $(LIBS)
- X
- Xshar: vtem.shar
- X touch shar
- Xvtem.shar: ${VTEMFILES} ${MISCFILES}
- X ${SHAR} ${MISCFILES} ${VTEMFILES} >vtem.shar
- X
- Xclean:
- X rm -f core tags a.out ${VOBJECTS} vtem shar vtem.shar
- X
- Xdepend:
- X @-grep '^#include' $(VSOURCES) | grep -v '<' | grep -v '../' | \
- X sed 's/:[^"]*"\([^"]*\)".*/: \1/' | sed 's/\.[cs]:/.o:/' | \
- X awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
- X else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
- X else rec = rec " " $$2 } } \
- X END { print rec } ' >> makedep
- X echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
- X echo '$$r makedep' >>eddep
- X echo 'w' >>eddep
- X cp Makefile Makefile.bak
- X ex - Makefile < eddep
- X rm eddep makedep
- X
- X
- X# DO NOT DELETE THIS LINE -- make depend uses it
- END_OF_FILE
- if test 2045 -ne `wc -c <'samples/vt100/Makefile'`; then
- echo shar: \"'samples/vt100/Makefile'\" unpacked with wrong size!
- fi
- # end of 'samples/vt100/Makefile'
- fi
- if test -f 'samples/vt100/VTEM_README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/vt100/VTEM_README'\"
- else
- echo shar: Extracting \"'samples/vt100/VTEM_README'\" \(1524 characters\)
- sed "s/^X//" >'samples/vt100/VTEM_README' <<'END_OF_FILE'
- XVTEM is a termcap-based VT100 terminal emulator originally written by
- XLeif Samuelsson (lsamuelsson@erisun) in December, 1985. It has
- Xbeen posted in various forms. This shar file contains a major revision
- Xof the package to support more complete VT100 emulation on a wider variety
- Xof terminals. Major changes to this version include:
- X
- X1/ emulates a VT52 (sort of), VT100, or VT102 depending on terminal
- X capabilities available in the termcap entry.
- X2/ responds to terminal inquiries, e.g. VMS "set term/inquire".
- X3/ fixes many bugs in the terminal emulation. It now passes most of
- X the vttest test suite with the exception of graphic characters,
- X keyboard input, and double high/double wide lines. On terminals
- X with less than 132 columns or limited standout capabilities it does
- X a reasonable job of displaying what it can. Emulation is
- X approximately as good as (or slightly better than) ms-kermit with
- X an IBM mono video adapter.
- X4/ supports VT102 emulation on terminals whose termcap entry includes
- X insert/delete character.
- X5/ correctly outputs "ti" and "te" sequences (needed if run from a Sun
- X cmdtool to turn off scroll bar).
- X
- XRevisions February 1989 by JQ Johnson <jqj@hogg.cc.uoregon.edu>.
- X
- XVTEM does not provide a VT100-style keypad. However, under SunView it
- Xcan be used with vttool or tooltool to provide such a mousable keypad.
- X
- XTo use with tooltool, give the command:
- X tooltool -f vt102tool.tt
- X
- XTooltool is available from Chuck Musciano, at trantor.harris-atd.com by
- Xanonymous ftp.
- END_OF_FILE
- if test 1524 -ne `wc -c <'samples/vt100/VTEM_README'`; then
- echo shar: \"'samples/vt100/VTEM_README'\" unpacked with wrong size!
- fi
- # end of 'samples/vt100/VTEM_README'
- fi
- if test -f 'samples/vt100/vt.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/vt100/vt.icon'\"
- else
- echo shar: Extracting \"'samples/vt100/vt.icon'\" \(1933 characters\)
- sed "s/^X//" >'samples/vt100/vt.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8003,0xFFFF,0xFFFF,0xF801,0x8004,0x0000,0x0000,0x0601,
- X 0x8004,0x7FFF,0xFFF8,0x0501,0x8004,0x8000,0x0004,0x0481,
- X 0x8005,0x0000,0x0002,0x0441,0x8005,0x0000,0x0002,0x0421,
- X 0x8005,0x0000,0x0002,0x0411,0x8005,0x0000,0x0002,0x0409,
- X 0x8005,0x0000,0x0002,0x0409,0x8005,0x45F1,0x0C32,0x0409,
- X 0x8005,0x4443,0x124A,0x0409,0x8005,0x4441,0x165A,0x0409,
- X 0x8005,0x2841,0x1A6A,0x0409,0x8005,0x2841,0x124A,0x0409,
- X 0x8005,0x1043,0x8C32,0x0409,0x8005,0x0000,0x0002,0x0409,
- X 0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
- X 0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
- X 0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
- X 0x8004,0x8000,0x0004,0x0409,0x8004,0x7FFF,0xFFF8,0x0409,
- X 0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
- X 0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
- X 0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
- X 0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
- X 0x801F,0xFFFF,0xFFFF,0xFFF9,0x8020,0x0000,0x0000,0x0089,
- X 0x8020,0x0000,0x0000,0x0109,0x8045,0x5555,0x5555,0x2909,
- X 0x8080,0x0000,0x0000,0x0209,0x808A,0xAAAA,0xAAAA,0x5209,
- X 0x8100,0x0000,0x0000,0x0409,0x8115,0x5555,0x5554,0xA409,
- X 0x8200,0x0000,0x0000,0x0809,0x820D,0xFFFF,0xFFD8,0x0809,
- X 0x8400,0x0000,0x0000,0x1009,0x87FF,0xFFFF,0xFFFF,0xFFF9,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- END_OF_FILE
- if test 1933 -ne `wc -c <'samples/vt100/vt.icon'`; then
- echo shar: \"'samples/vt100/vt.icon'\" unpacked with wrong size!
- fi
- # end of 'samples/vt100/vt.icon'
- fi
- if test -f 'samples/vt100/vtem.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/vt100/vtem.1'\"
- else
- echo shar: Extracting \"'samples/vt100/vtem.1'\" \(2404 characters\)
- sed "s/^X//" >'samples/vt100/vtem.1' <<'END_OF_FILE'
- X.TH VTEM 1 1989-05-09
- X.\" $Header: /home/hogg/src/local/vt/RCS/vtem.1,v 1.2 89/05/09 11:01:24 jqj Exp $
- X.\"
- X.\" $Log: vtem.1,v $
- X.\" Revision 1.2 89/05/09 11:01:24 jqj
- X.\" update for vtem version 1.2, e.g. VT102 support. Also cleaned up man page.
- X.\"
- X.\"
- X.SH NAME
- Xvtem \- a VT102 emulator based on termcap
- X.SH SYNOPSIS
- X.B vtem
- X[
- X.I command
- X]
- X.SH DESCRIPTION
- X.LP
- X.I vtem
- Xruns on BSD4.2 and works by starting a sub-shell and then translating
- Xoutput escape sequences. Its function is limited by the capabilities
- Xlisted in the termcap database and the capabilities of the actual
- Xterminal that it is being run on.
- X.LP
- XIf arguments are given, then this command is passed to the shell, e.g.:
- X
- X vtem telnet ibm
- X
- XThe emulator has been tested with Per Lindberg's excellent verifier ,
- X.IR vttest ,
- Xand has been found to give acceptable results on the following terminals:
- X.br
- X Sun windows
- X.br
- X PC-Kermit in h19 emulation mode.
- X.br
- X VT100 (!)
- X.LP
- XOn a Sun, you can use the following Suntools rootmenu entry:
- X.LP
- X.nf
- X"VT100 Tool" shelltool -Ww 80 -Wh 24 -Wl "VT100 Tool" vtem
- X.fi
- X.LP
- XYou can also use
- X.I vttool
- Xor
- X.I tooltool
- Xto provide buttons for vtem.
- X.SH BUGS
- X.LP
- XRelease 1.2 (jqj) of vtem has the following bugs and limitations:
- X.LP
- XRegion scroll will only work on terminals with
- Xsr or al/dl capabilities. On terminals without these capabilities,
- X.I vtem
- Xemulates a VT52.
- X.LP
- XOn terminals without delete and insert character (dc and either ic or im)
- Xcapabilities,
- X.I vtem
- Xemulates a VT100. If these capabilities are present,
- X.I vtem
- Xemulates a VT102.
- X.LP
- XIt will never write in the last position of the screen,
- Xbecause of the unpredictable behaviour of many terminals.
- X.LP
- XNo soft scroll.
- X.LP
- XThe display is truncated on the right at either the actual number of
- Xcolumns on the screen or 80 (132 in 132 column mode), whichever is
- Xless. On normal 80-column displays, this implies that 132 column mode
- Xis effectively useless.
- X.LP
- XInput is not translated, which means no function key emulation.
- X(See vttool).
- X.LP
- XNo double height or double width lines.
- X.LP
- XNo alternate character set, meaning very limited graphics.
- X.LP
- XNo printer support.
- X.LP
- XNo settable answerback messages.
- X.LP
- XNo SETUP mode.
- X.LP
- XNo LEDs.
- X.SH AUTHOR
- X.LP
- XOriginal author Leif Samuelsson, leif@erisun.UUCP or ..enea!erix!erisun!leif
- X.LP
- XModifications by Bruce G. Barnett, barnett@crd.ge.com, and JQ Johnson, jqj@oregon.uoregon.edu
- X
- X
- END_OF_FILE
- if test 2404 -ne `wc -c <'samples/vt100/vtem.1'`; then
- echo shar: \"'samples/vt100/vtem.1'\" unpacked with wrong size!
- fi
- # end of 'samples/vt100/vtem.1'
- fi
- if test -f 'samples/vt100/vtem.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'samples/vt100/vtem.h'\"
- else
- echo shar: Extracting \"'samples/vt100/vtem.h'\" \(1542 characters\)
- sed "s/^X//" >'samples/vt100/vtem.h' <<'END_OF_FILE'
- X/*
- X * vtem - A termcap driven VT100 emulator for BSD Unix
- X *
- X * $Header: /home/src/local/vttool/RCS/vtem.h,v 1.2 89/02/08 16:05:27 jqj Exp $
- X *
- X * Public domain software.
- X * Written by Leif Samuelsson (lsamuelsson@erisun) in December, 1985
- X *
- X * $Log: vtem.h,v $
- X * Revision 1.2 89/02/08 16:05:27 jqj
- X * 1/ added enumerated type and terminal capabilities for VT102 support
- X * 2/ redefined set_cursor to handle c values greater than CO [N.B. c is
- X * now evaluated twice so don't do ``set_cursor(col++,row)'']
- X *
- X */
- X
- X#include <stdio.h>
- X#include <signal.h>
- X#include <sys/types.h>
- X#include <sys/time.h>
- X#include <sys/stat.h>
- X#include <sys/ioctl.h>
- X
- X#define FALSE 0
- X#define TRUE 1
- X
- Xtypedef short Bool;
- X
- Xextern char *getenv();
- Xextern putchar_x();
- X
- Xextern struct sgttyb oldb, newb;
- Xextern struct tchars oldtchars, newtchars;
- Xextern struct ltchars oldltchars, newltchars;
- Xextern int oldlb, newlb, oldl, newl;
- X
- Xextern int master;
- X
- Xenum vt_terminal {VT52, VT100, VT102};
- Xextern enum vt_terminal vttype;
- X
- Xextern Bool BS;
- Xextern int CO, LI;
- Xextern char *AL, *BC, *BL, *CB, *CD, *CL, *CE, *CM, *CR, *CS, *DC,
- X *DL, *DO, *EI, *IC, *IM,
- X *KE, *KS, *MB, *MD, *ME, *MR, *ND, *NL, *SE, *SO, *SR,
- X *TI, *TE, *UE, *UP, *US, *MAL, *MDL;
- X
- X#define tputs_x(s) (tputs(s, 1, putchar_x))
- X#define tputs_pad(s,pad) (tputs(s, (pad), putchar_x))
- X
- X
- X#define backspace() (tputs_x(BC))
- X#define clear_screen() (tputs_pad(CL,LI))
- X#define set_cursor(c, r) (tputs_x(tgoto(CM, ((c)>=CO?CO-1:(c)), (r))))
- X#define linefeed() (tputs_x(NL))
- X#define cr() (tputs_x(CR))
- END_OF_FILE
- if test 1542 -ne `wc -c <'samples/vt100/vtem.h'`; then
- echo shar: \"'samples/vt100/vtem.h'\" unpacked with wrong size!
- fi
- # end of 'samples/vt100/vtem.h'
- fi
- if test -f 'selection.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'selection.c'\"
- else
- echo shar: Extracting \"'selection.c'\" \(2511 characters\)
- sed "s/^X//" >'selection.c' <<'END_OF_FILE'
- X/************************************************************************/
- X/* Copyright 1988 by Chuck Musciano and Harris Corporation */
- X/* */
- X/* Permission to use, copy, modify, and distribute this software */
- X/* and its documentation for any purpose and without fee is */
- X/* hereby granted, provided that the above copyright notice */
- X/* appear in all copies and that both that copyright notice and */
- X/* this permission notice appear in supporting documentation, and */
- X/* that the name of Chuck Musciano and Harris Corporation not be */
- X/* used in advertising or publicity pertaining to distribution */
- X/* of the software without specific, written prior permission. */
- X/* Chuck Musciano and Harris Corporation make no representations */
- X/* about the suitability of this software for any purpose. It is */
- X/* provided "as is" without express or implied warranty. */
- X/* */
- X/* The sale of any product based wholely or in part upon the */
- X/* technology provided by tooltool is strictly forbidden without */
- X/* specific, prior written permission from Harris Corporation. */
- X/* Tooltool technology includes, but is not limited to, the source */
- X/* code, executable binary files, specification language, and */
- X/* sample specification files. */
- X/************************************************************************/
- X
- X#include <stdio.h>
- X#include <sys/types.h>
- X#include <suntool/selection_svc.h>
- X#include <suntool/selection_attributes.h>
- X
- X#include "tooltool.h"
- X
- XPRIVATE Seln_result read_proc();
- X
- XPRIVATE char *buf, *pos;
- X
- XEXPORT char *tt_get_selection(level)
- X
- Xint level;
- X
- X{ Seln_client client;
- X Seln_holder holder;
- X Seln_rank rank;
- X char context = 0;
- X
- X if (level == 1)
- X rank = SELN_PRIMARY;
- X else if (level == 2)
- X rank = SELN_SECONDARY;
- X else if (level == 3)
- X rank = SELN_SHELF;
- X else
- X return("");
- X holder = seln_inquire(rank);
- X if (holder.state == SELN_NONE)
- X return("");
- X pos = buf = tt_emalloc(65536);
- X *buf = '\0';
- X seln_query(&holder, read_proc, &context, SELN_REQ_CONTENTS_ASCII, 0, 0);
- X return(buf);
- X}
- X
- XPRIVATE Seln_result read_proc(buffer)
- X
- XSeln_request *buffer;
- X
- X{ char *reply;
- X
- X if (buffer) {
- X if (*buffer->requester.context == 0) {
- X if (*((Seln_attribute *) buffer->data) != SELN_REQ_CONTENTS_ASCII)
- X return(SELN_FAILED);
- X reply = buffer->data + sizeof(Seln_attribute);
- X *buffer->requester.context = 1;
- X }
- X else
- X reply = buffer->data;
- X strcpy(pos, reply);
- X pos += strlen(reply);
- X }
- X return(SELN_SUCCESS);
- X}
- END_OF_FILE
- if test 2511 -ne `wc -c <'selection.c'`; then
- echo shar: \"'selection.c'\" unpacked with wrong size!
- fi
- # end of 'selection.c'
- fi
- if test -f 'tooltool.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tooltool.icon'\"
- else
- echo shar: Extracting \"'tooltool.icon'\" \(1933 characters\)
- sed "s/^X//" >'tooltool.icon' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x87FF,0xFFF0,0x0FFF,0xFFE1,0x8800,0x0008,0x1000,0x0011,
- X 0x8BF8,0x0048,0x17F0,0x0091,0x8840,0x0048,0x1080,0x0091,
- X 0x8840,0x0048,0x1080,0x0091,0x8847,0x1C48,0x108E,0x3891,
- X 0x8848,0xA248,0x1091,0x4491,0x8848,0xA248,0x1091,0x4491,
- X 0x8848,0xA248,0x1091,0x4491,0x8847,0x1C48,0x108E,0x3891,
- X 0x8800,0x0008,0x1000,0x0011,0x87FF,0xFFF0,0x0FFF,0xFFE1,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8020,0x8181,0x81C2,0x0011,0x8020,0x8181,0x81C2,0x0011,
- X 0x8FFF,0xFCFF,0xFFFF,0xFFE1,0x8FFF,0xFCFF,0xFFFF,0xFFE1,
- X 0x8280,0x0000,0x0000,0x0001,0x8280,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x4004,0x0100,0x0001,0x8000,0x4004,0x0100,0x0001,
- X 0x8FEF,0x7BDF,0xFFFC,0x0001,0x8FEF,0x7BDF,0xFFFC,0x0001,
- X 0x8000,0x0800,0x0000,0x0001,0x8000,0x0800,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8042,0x2000,0x0000,0x0001,0x8042,0x2000,0x0000,0x0001,
- X 0x8FFF,0xBE00,0x0000,0x0001,0x8FFF,0xBE00,0x0000,0x0001,
- X 0x8410,0x0400,0x0000,0x0001,0x8410,0x0400,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8011,0x8000,0x0000,0x0001,0x8011,0x8000,0x0000,0x0001,
- X 0x801F,0xF800,0x0000,0x0001,0x801F,0xF800,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0900,0x5298,0x0001,0x8000,0x0900,0x5298,0x0001,
- X 0x801F,0xF8FF,0x7C70,0x0001,0x801F,0xF8FF,0x7C70,0x0001,
- X 0x8000,0x0020,0x0000,0x0001,0x8000,0x0020,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- END_OF_FILE
- if test 1933 -ne `wc -c <'tooltool.icon'`; then
- echo shar: \"'tooltool.icon'\" unpacked with wrong size!
- fi
- # end of 'tooltool.icon'
- fi
- if test -f 'tooltool.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tooltool.man'\"
- else
- echo shar: Extracting \"'tooltool.man'\" \(791 characters\)
- sed "s/^X//" >'tooltool.man' <<'END_OF_FILE'
- X.TH TOOLTOOL 1 "28 March 1988"
- X.SH NAME
- Xtooltool \- create a windowed tool
- X.SH SYNOPSIS
- X\fBtooltool\fP [ \fB-f\fP \fIfile\fP ] [ \fIargs\fP ]
- X.SH DESCRIPTION
- XTooltool creates a windowed application based upon specifications read from
- Xits standard input. If \fB-f\fP is specified, the specifications are
- Xread from the indicated \fIfile\fP. The shell search path is used to
- Xlocate \fIfile\fP if it is not a complete pathname. Any \fIargs\fP are
- Xpassed on to the windowed application.
- X.LP
- XThe details of the application specification are too numerous to mention
- Xhere. The user is referred to the \fITooltool User's Guide\fP for
- Xmore information.
- X.SH AUTHOR
- XChuck Musciano
- X.br
- XAdvanced Technology Department
- X.br
- XHarris Corporation
- X.br
- X(407) 727-6131
- X.br
- XARPA: chuck@trantor.harris-atd.com
- X
- END_OF_FILE
- if test 791 -ne `wc -c <'tooltool.man'`; then
- echo shar: \"'tooltool.man'\" unpacked with wrong size!
- fi
- # end of 'tooltool.man'
- fi
- echo shar: End of archive 1 \(of 13\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 13 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-